import React from 'react';
import { connect } from 'dva';
import CheckPassword from 'components/account/CheckPassword';

const ResetPasswordPage = ({ location, ...rest }) => {

  const handleAction = (form) => ({
    type: 'account/resetPassword',
    payload: {
      ...location.state,
      pwd: form.getFieldValue('pswd'),
    },
  });

  return (
    <CheckPassword action={handleAction} />
  );
}

export default connect()(ResetPasswordPage);
